package com.fs.activiti5.vo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.activiti.engine.repository.Deployment;

import com.alibaba.fastjson.annotation.JSONField;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author Administrator
 *
 */
@Data
@AllArgsConstructor
public class DeploymentVo {
	private String id;
	private String name;
	
	@JSONField (format="yyyy-MM-dd HH:mm:ss")
	private Date deploymentTime;
	
	public static List<DeploymentVo> list(List<Deployment> vos){
		List<DeploymentVo> list = new ArrayList<>();
		for(Deployment d: vos){
			list.add(new DeploymentVo(d.getId(), d.getName(), d.getDeploymentTime()));
		}
		return list;
	}
}
